<div id="content" class="friend">
	<h1><?=$data->TITLE?></h1>
	<? if($data->friend->list) foreach ($data->friend->list as $p):?>
		<div id="P<?=$p->ID?>" class="request">
			<? include 'apps/profile/template/mini.html'; ?>
			<span class="userName"><?=$p->fullname?></span><br />
			<?/*<a href="javascript:block(<?=$p->ID?>);" title="<?=_('Block this member.')?>"><?=_('Block')?></a> */?>
			<div class="links">
			<a class="mini" href="javascript:remove(<?=$p->ID?>);" title="<?=_('remove from friends')?>"><?=_('Remove')?></a>
			</div>
			<div class="clear"></div>
		</div>
	<?endforeach;?>
<div class="clear"></div>
</div>
<div id="aside"></div>
<script type="text/javascript">
    function remove(ID, c){
        if(c)
            tool.post({'url':'/json/friend/reject',
                'data':'friendID='+ID,
                'onComplete':function(e){
                    if(e.code==200) $('#P'+ID).fadeOut();
                    else return tool.result("<?=_('Alert')?>"
                    ,"<?=_('Please try again later..')?>",400);
                }
        });
        else
            tool.confirm('<?=_("Confirm")?>',
        '<?=_("Are you sure remove this person from friends?")?>'
        ,'remove('+ID+', 1)');
    }
</script>